package com.product.service.impl;

import com.product.Dao.LoginDao;
import com.product.Dao.impl.LoginDaoImpl;
import com.product.exception.AppException;
import com.product.exception.SelectNotException;
import com.product.pojo.Login;
import com.product.service.LoginService;


public class LoginServiceUImpl implements LoginService {
    @Override
    public int modifyPassword(Login login) throws SelectNotException, AppException {
        int count=logindao.update(login);
        return count;
    }

    //多态
    LoginDao logindao=new LoginDaoImpl();

    @Override
    public int registerUser(Login login) throws SelectNotException, AppException {
        int count=logindao.insert(login);
        return count;
    }

    @Override
    public int findUser(String username, String password)
            throws SelectNotException, AppException {
        int count=logindao.selectByLoginUser(username,password);
        return count;
    }
}
